#include<stdio.h>
#include<string.h>
int main()
{
    char s[]="A123X456Y7A,302ATB567BC";
    int tot=0;
    int i,len=strlen(s);
    for(i=0;i<len;i++)
    {
        while(i<len&&!isdigit(s[i]))i++;
        while(i<len&&isdigit(s[i]))putchar(s[i]),i++;
        putchar(' ');
        ++tot;

    }
    printf("\ntot=%d\n",tot);


    return 0;
}
